package com.yim.counter;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

/**
 * 清理代码前面的数字
 * @filename ClearLineNumber.java
 * @author chenzhiyan
 * @datetime 2013-11-22上午9:26:33
 * @version
 */
public class ClearLineNumber {
	private String strSourceCode = "";
	private BufferedReader br;
	
	public ClearLineNumber(String filePath)throws Exception{
		File file = new File(filePath);
		br = new BufferedReader(new FileReader(file));
	}
	
	public String getSourceCode() throws Exception{
		String string = br.readLine();
		while(string!=null){
			if (string.matches("^[0-9]+")==false) {
				strSourceCode +=string + "\n";
			}
			string = br.readLine();
		}
		return strSourceCode;
	}

}
